Assertion with Aspect
نویسندگان
چکیده
Programmers use assertion to enforce design by contract. However, in Object-Oriented Programming, assertion has few drawbacks. One drawback is that assertion may prevent the reuse of a class. Another is that programmers cannot express assertion about inter-object relations. Using Aspect-Oriented Programming technique, which enables to describe a crosscutting concern in one module, programmers can write assertions of inter-object relations. In this paper, we discuss the effect of writing assertions as aspects.
منابع مشابه
An Aspect-oriented Approach to Modular Behavioral Specification of Java Components
Behavioral interface specification languages, such as Java Modeling Language (JML), can be used to specify the behavior of program modules. We have developed a behavioral interface specification language Moxa, an extension of JML. Moxa provides the new modularization mechanism called assertion aspect that can capture the crosscutting properties among assertions. In this paper, we briefly explai...
متن کاملMoxa: An Aspect-Oriented Approach to Modular Behavioral Specifications
Design-by-Contract (DbC) is a software development method that utilizes assertions in a principled manner, and is beneficial for building reliable software systems. However, in our experience of applying DbC to the development of a working application, we faced a difficulty in dealing with assertions that have properties spanning over the natural program structure. Such crosscutting properties ...
متن کاملExtending Design by Contract for Aspect-Oriented Programming
Design by Contract (DbC) and runtime enforcement of program assertions enables the construction of more robust software. It also enables the assignment of blame in error reporting. Unfortunately, there is no support for runtime contract enforcement and blame assignment for Aspect-Oriented Programming (AOP). Extending DbC to also cover aspects brings forward a plethora of issues related to the c...
متن کاملExamining the mediation of self-assertion in the relationship between family function and addiction tendency an example of high school students
Purpose: The purpose of this study was to examine the mediation of self-assertion in the relationship between family function and addiction tendency in a sample of second grade high school students in Sanandaj. Method: The present study is a descriptive and path analysis method. Based on the knowledge of secondary school boy students in Sanandaj and based on the Cochran formula, 366 students we...
متن کاملRule-dynamical generalization of McCulloch-Pitts neuron networks.
A new aspect for neuronal networks is presented. The aspect is based on the concept of ruledynamics which was originally proposed by one of the authors, Aizawa. The concept of ruledynamics were modeled on the two states cellular automata of neighborhood-three (CA(2/3)). A brief review of ruledynamics is also presented, because most publications of the authors so far have been in Japanese. Our c...
متن کامل